package com.hujing.eventpublish.service.impl;

import com.hujing.eventpublish.event.BizEvent;
import com.hujing.eventpublish.listener.NoticeListener;
import com.hujing.eventpublish.service.EventEngine;
import org.springframework.stereotype.Service;

@Service
public class EventEngineImpl implements EventEngine {
    @Override
    public void publishEvent(BizEvent event) {
        //获取监听器
        NoticeListener noticeListener = new NoticeListener();
        noticeListener.invokeEvent(event);
    }
}
